import java.util.Scanner;

public class ZifuchuanZhuanzuixiaozifuchuan {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] cArr = str.toCharArray();
        char tmp = cArr[0];
        int tmpIndex = 0;
        for (int left = 0; left < cArr.length; left++) {
            tmp = cArr[left];
            tmpIndex = left;
            for (int i = left; i < cArr.length; i++) {
                if (cArr[i] < tmp) {
                    tmp = cArr[i];
                    tmpIndex = i;
                }
            }

            if (tmpIndex != left) {
                cArr[tmpIndex] = cArr[left];
                cArr[left] = tmp;
                break;
            }
        }

        str = String.valueOf(cArr);
        System.out.println(str);
    }
}
